package com.hotel.homehotel.before.entiy;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
//    @TableField(value="user_id")
    private String id;


    @ApiModelProperty(value = "用户真实姓名")
    @TableField("user_name")
    private String name;


    @ApiModelProperty(value = "密码")
    @TableField("user_password")
    private String password;
    @JsonIgnore
    @ApiModelProperty(value = "盐")
    private String salt;

    @ApiModelProperty(value = "性别")
    private String sex;

    @ApiModelProperty(value = "年龄")
    private Integer age;
    @ApiModelProperty(value = "身份证")
    private String idCard;
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ApiModelProperty(value = "电话")
    private String phoneNumber;
    @ApiModelProperty(value = "头像")
    private String avatar;


    @JsonIgnore
    @ApiModelProperty(value = "创建时间",example = "2019-01-01 8:00:00")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @JsonIgnore
    @ApiModelProperty(value = "更新时间")
    @TableField(fill=FieldFill.INSERT_UPDATE)
    private Date updatedTime;


    @JsonIgnore
    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    @TableLogic
    private Integer isDeleted;



    @ApiModelProperty(value = "是否启用 1（true）启用， 0（false）禁用")
    @JsonIgnore
    private Integer isEnabled;

    @JsonIgnore
    @ApiModelProperty(value = "创建者")
    private String createdBy;

    @JsonIgnore
    @ApiModelProperty(value = "修改者")
    private String updatedBy;

//    @TableField(exist = false)
    @ApiModelProperty(value = "爱好")
    private String hobby;


}
